﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ASPNETMVCApplication.Areas.Shop.Models
{
    public class StatusModel
    {
        public List<Status> List { get; set; }

        public StatusModel()
        {
            List = new List<Status>();
            Status status = new Status();
            status.StatusId = 0;
            status.Description = "Chưa bán";
            List.Add(status);
            status.StatusId = 1;
            status.Description = "Đã bán";
            List.Add(status);
            status.StatusId = 2;
            status.Description = "Lệnh mới";
            List.Add(status);
        }
    }

    public class Status
    {
        public int StatusId { get; set; }
        private string description;

        public string Description
        {
            get 
            {
                if (StatusId == 0)
                {
                    return "Chưa bán";
                }
                else if (StatusId == 1)
                {
                    return "Đã bán";
                }
                else
                {
                    return "Lệnh mới";
                }                                
            }

            set { description = value; }            
        }
        
    }
}
